package sg.edu.nus.iss.vmcs.system;

import sg.edu.nus.iss.vmcs.customer.CustomerPanel;
import sg.edu.nus.iss.vmcs.customer.DrinkSelectionBox;
import sg.edu.nus.iss.vmcs.customer.ProductSelectionBox;
import sg.edu.nus.iss.vmcs.customer.TransactionController;
import sg.edu.nus.iss.vmcs.maintenance.DrinkDisplay;
import sg.edu.nus.iss.vmcs.maintenance.MaintenanceController;
import sg.edu.nus.iss.vmcs.maintenance.ProductDisplay;
import sg.edu.nus.iss.vmcs.store.DrinksBrand;
import sg.edu.nus.iss.vmcs.store.DrinksStore;
import sg.edu.nus.iss.vmcs.store.DrinksStoreItem;
import sg.edu.nus.iss.vmcs.store.ProductBrand;
import sg.edu.nus.iss.vmcs.store.ProductStore;
import sg.edu.nus.iss.vmcs.store.ProductStoreItem;

public class DrinkProductFactory extends ProductFactory {

	/**
	 * Factory method that creates a StoreItem with a StoreObject and quantity
	 * 
	 * @param content
	 *            content of this StoreItem will represent
	 * @param quantity
	 *            the quantity of this StoreItem
	 */
	public ProductStoreItem createProductStoreItem(ProductBrand content, int quantity) {
		return new DrinksStoreItem((DrinksBrand) content, quantity);
	}

	/**
	 * Factory method that creates a ProductBrand
	 */
	public ProductBrand createProductBrand() {
		return new DrinksBrand();
	}

	/**
	 * Factory method that creates a ProductBrand with a name
	 * 
	 * @param n
	 *            the name of the ProductBrand
	 */
	public ProductBrand createProductBrand(String name) {
		return new DrinksBrand(name, 0);
	}

	/**
	 * Factory method that creates a ProductStore
	 */
	public ProductStore createProductStore() {
		return new DrinksStore();
	}

	/**
	 * Factory method that creates an instance of a Product Selection Box
	 * 
	 * @param customerPanel
	 *            The parent customer panel
	 * @param transactionController
	 *            The transaction controller controlling this object
	 */
	public ProductSelectionBox createSelectionBox(CustomerPanel customerPanel,
			TransactionController transactionController) {
		return new DrinkSelectionBox(customerPanel, transactionController);
	}

	/**
	 * Factory method that creates an instance of a product display
	 * 
	 * @param mctrl
	 * @return
	 */
	public ProductDisplay createProductDisplay(MaintenanceController mctrl) {
		return new DrinkDisplay(mctrl);
	}

	public  ProductPropertyLoader createProductPropertyLoader(String filen) {

		return new DrinkPropertyLoader(filen);
		
	}
	
}
